Skip to content

Add building and container recipes#33

Closed
zhangrongchuan wants to merge 1 commit intoSimulation-Software-Engineering:mainfrom
zhangrongchuan:main
Closed

Add building and container recipes#33
zhangrongchuan wants to merge 1 commit intoSimulation-Software-Engineering:mainfrom
zhangrongchuan:main

Conversation

@zhangrongchuan
Copy link
Copy Markdown

(GitLab username: rongchzg)

✔ Features Included

🔹 CMake configuration

  • Full support for:
    • Boost.Container (flatset example)
    • Boost.Filesystem
    • deal.II (FEM Poisson solver)
    • yaml-cpp v0.6.3 (bonus, built from source)
  • Clean target setup compatible with deal.II macros
  • Plain-style target_link_libraries to avoid keyword conflicts with deal.II

🔹 Docker environment

  • Base image: Ubuntu 24.04
  • Installs via apt:
    • build-essential, cmake, git, wget, unzip, vim
    • libboost-all-dev
    • libdeal.ii-dev
  • Builds yaml-cpp v0.6.3 from source manually:
    • Downloads from GitHub release
    • cmake .., make, make install, ldconfig
  • Copies entire project into container
  • Ensures clean environment (rm -rf build main)

✔ Implemented Modules

  • flatset/ (Boost.Container)
  • filesystem/ (Boost.Filesystem)
  • fem/ (deal.II Poisson solver)
  • yamlParser/ (yaml-cpp parsing)

✔ Runtime Verification

Inside the container:

docker run -it cmake-exercise
cd cmake-exercise
./build_and_run.sh

Copy link
Copy Markdown

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, everything looks good here and works, thanks! Make sure to not push generated files to the repository.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not include the build/ directory in the repository.


# ---- deal.II ----
find_package(deal.II REQUIRED HINTS /usr/lib/cmake/deal.II)
DEAL_II_INITIALIZE_CACHED_VARIABLES()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, in CMake, lowercase and uppercase are equivalent.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not include binaries in the repository.

@MakisH MakisH closed this Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants